//
//  ColorExtension.swift
//  WineComing
//
//  Created by xiaozhi on 15/7/1.
//  Copyright (c) 2015年 xiaozhi. All rights reserved.
//

import UIKit
extension UIColor{
    convenience init(hex:Int,alpha:CGFloat = 1.0){
        let red = CGFloat((hex&0xff0000)>>16)/255.0
        let green = CGFloat((hex&0xff00)>>8)/255.0
        let blue = CGFloat(hex&0xff)/255.0
        self.init(red:red,green:green,blue:blue,alpha:alpha)
    }
}